﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;
using EasyTest.Application.Service.QuestionBank.Enum;

namespace EasyTest.Application.Service;

    /// <summary>
    /// 题目管理基础输入参数
    /// </summary>
    public class EtQuestionBaseInput
    {
        /// <summary>
        /// 排序
        /// </summary>
        public virtual int OrderNo { get; set; }
        
        /// <summary>
        /// 状态
        /// </summary>
        public virtual int Status { get; set; }
        
        /// <summary>
        /// 租户Id
        /// </summary>
        public virtual long? TenantId { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        public virtual DateTime? CreateTime { get; set; }
        
        /// <summary>
        /// 更新时间
        /// </summary>
        public virtual DateTime? UpdateTime { get; set; }
        
        /// <summary>
        /// 创建者Id
        /// </summary>
        public virtual long? CreateUserId { get; set; }
        
        /// <summary>
        /// 创建者姓名
        /// </summary>
        public virtual string? CreateUserName { get; set; }
        
        /// <summary>
        /// 修改者Id
        /// </summary>
        public virtual long? UpdateUserId { get; set; }
        
        /// <summary>
        /// 修改者姓名
        /// </summary>
        public virtual string? UpdateUserName { get; set; }
        
        /// <summary>
        /// 软删除
        /// </summary>
        public virtual bool IsDelete { get; set; }
        
        /// <summary>
        /// 题库
        /// </summary>
        public virtual long QuestionBankId { get; set; }
        
        /// <summary>
        /// 题目分类
        /// </summary>
        public virtual long CategoryId { get; set; }
        
        /// <summary>
        /// 题目内容
        /// </summary>
        public virtual string Content { get; set; }
        
        /// <summary>
        /// 题目类型
        /// </summary>
        public virtual CryptogramEnum QuestionType { get; set; }
        
        /// <summary>
        /// 选项
        /// </summary>
        public virtual string Options { get; set; }
        
        /// <summary>
        /// 答案
        /// </summary>
        public virtual string Answer { get; set; }
        
        /// <summary>
        /// 解析
        /// </summary>
        public virtual string Analysis { get; set; }
        
        /// <summary>
        /// 难度
        /// </summary>
        public virtual NoticeStatusEnum Difficulty { get; set; }
        
        /// <summary>
        /// 分数
        /// </summary>
        public virtual int Score { get; set; }
        
        /// <summary>
        /// 标签
        /// </summary>
        public virtual string Tags { get; set; }
        
        /// <summary>
        /// 时间限制（秒）
        /// </summary>
        public virtual int TimeLimit { get; set; }
        
        /// <summary>
        /// 附件
        /// </summary>
        public virtual string Attachments { get; set; }
        
        /// <summary>
        /// 出题人备注
        /// </summary>
        public virtual string CreatorComments { get; set; }
        
        /// <summary>
        /// 跳转地址ID
        /// </summary>
        public virtual int?  JumpAddressId { get; set; }
        
        /// <summary>
        /// 跳转地址路径
        /// </summary>
        public virtual string JumpAddressPath { get; set; }
        
        /// <summary>
        /// 创建者部门Id
        /// </summary>
        public virtual long? CreateOrgId { get; set; }
        
        /// <summary>
        /// 创建者部门名称
        /// </summary>
        public virtual string? CreateOrgName { get; set; }
        
    }

    /// <summary>
    /// 题目分页查询参数
    /// </summary>
    public class PageEtQuestionInput : BasePageInput
    {
        /// <summary>
        /// 关键字查询
        /// </summary>
        public string? SearchKey { get; set; }

        /// <summary>
        /// 题库ID
        /// </summary>
        public long? QuestionBankId { get; set; }

        /// <summary>
        /// 分类ID
        /// </summary>
        public long? CategoryId { get; set; }

        /// <summary>
        /// 难度
        /// </summary>
        public DifficultyEnum? Difficulty { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public int? Status { get; set; }

        /// <summary>
        /// 排序字段
        /// </summary>
        public string? SortField { get; set; }

        /// <summary>
        /// 排序方式
        /// </summary>
        public string? SortOrder { get; set; }
    }

    /// <summary>
    /// 题目管理增加输入参数
    /// </summary>
    public class AddEtQuestionInput : EtQuestionBaseInput
    {
        /// <summary>
        /// 排序
        /// </summary>
        [Required(ErrorMessage = "排序不能为空")]
        public override int OrderNo { get; set; }
        
        /// <summary>
        /// 状态
        /// </summary>
        [Required(ErrorMessage = "状态不能为空")]
        public override int Status { get; set; }
        
        /// <summary>
        /// 软删除
        /// </summary>
        [Required(ErrorMessage = "软删除不能为空")]
        public override bool IsDelete { get; set; }
        
        /// <summary>
        /// 题库
        /// </summary>
        [Required(ErrorMessage = "题库不能为空")]
        public override long QuestionBankId { get; set; }
        
        /// <summary>
        /// 题目分类
        /// </summary>
        [Required(ErrorMessage = "题目分类不能为空")]
        public override long CategoryId { get; set; }
        
        /// <summary>
        /// 题目内容
        /// </summary>
        [Required(ErrorMessage = "题目内容不能为空")]
        public override string Content { get; set; }
        
        /// <summary>
        /// 题目类型
        /// </summary>
        [Required(ErrorMessage = "题目类型不能为空")]
        public override CryptogramEnum QuestionType { get; set; }
        
        /// <summary>
        /// 难度
        /// </summary>
        [Required(ErrorMessage = "难度不能为空")]
        public override NoticeStatusEnum Difficulty { get; set; }
        
    }

    /// <summary>
    /// 题目管理删除输入参数
    /// </summary>
    public class DeleteEtQuestionInput : BaseIdInput
    {
    }

    /// <summary>
    /// 题目管理更新输入参数
    /// </summary>
    public class UpdateEtQuestionInput : EtQuestionBaseInput
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        [Required(ErrorMessage = "主键Id不能为空")]
        public long Id { get; set; }
        
    }

    /// <summary>
    /// 题目管理主键查询输入参数
    /// </summary>
    public class QueryByIdEtQuestionInput : DeleteEtQuestionInput
    {

    }
